﻿
          @using DBMS.Models;

@{
    ViewBag.Title = "EditRow";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit Row</h2>

@using (Html.BeginForm("EditRow", "Values"))
{
    string databaseId = ViewBag.Database.Index.ToString();
    string rowId = ViewBag.RowId.ToString();
    string tableId = ViewBag.Table.Index.ToString();
    
    @Html.Hidden("databaseId", databaseId)
    @Html.Hidden("tableId", tableId)
    @Html.Hidden("rowId", rowId)
    
    <table>
        <tbody>
            <tr>
                @foreach (Value value in ViewBag.Values)
                {
                    <td>
                        <input type="text" name="values" class="textbox" value="@value.ConcreteValue" />
                    </td>
                }
            </tr>
        </tbody>
    </table>
    
    <input type="submit" value="Save" />
}